<%@page import="java.util.ArrayList"%>
<%@page import="form.ValidationConnexion"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<jsp:useBean id="medecin" scope="request" class="beans.Medecin"/>
<jsp:useBean id="manager" scope="session" class="manager.Manager"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Connexion</title>
</head>
<body>

<%
ArrayList <String> messages = manager.getMessage();
out.println("<div style=\"color:red\">");
out.println("<ul>");
for (String mess : messages)
{
	out.println("<li>"+mess+"</li>");
}
out.println("</ul>");
out.println("</div>");

if(request.getParameter("submit") != null)
{
	boolean res = ValidationConnexion.form(request, medecin);
	out.println("validation: "+ res);
}
%>

<form>

<table>
<tr>
	<td>Identifiant:</td>
	<td><input type="text" name="ident" value="${medecin.login }" /></td>
	<td></td>
</tr>
<tr>
	<td>Mot de passe:</td>
	<td><input type="password" name="mdp" value="" /></td>
	<td></td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td><input type="submit" name="submit" value="Valider" /></td>
</tr>
</table>

</form>

</body>
</html>